package com.qf.day06.fish;

public class Animal {
    private String type;
    private int age;
    private String sex;

    public Animal() {
    }

    public Animal(String type, int age, String sex) {
        this.type = type;
        this.age = age;
        this.sex = sex;
    }

    /**
     * 获取
     * @return type
     */
    public String getType() {
        return type;
    }

    /**
     * 设置
     * @param type
     */
    public void setType(String type) {
        this.type = type;
    }

    /**
     * 获取
     * @return age
     */
    public int getAge() {
        return age;
    }

    /**
     * 设置
     * @param age
     */
    public void setAge(int age) {
        this.age = age;
    }

    /**
     * 获取
     * @return sex
     */
    public String getSex() {
        return sex;
    }

    /**
     * 设置
     * @param sex
     */
    public void setSex(String sex) {
        this.sex = sex;
    }
    public void eat(){
        System.out.println(this.type+"正在吃东西");

    }
    public void sleep(){
        System.out.println(this.type+"正在睡觉");
    }

    public String toString() {
        return "Animal{type = " + type + ", age = " + age + ", sex = " + sex + "}";
    }
}
